import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    component: () => import('@/view/Home'),
    children: [
      {
        path: '/all_relations_2d',
        component: () => import('@/view/all_relations/Two')
      },
      {
        path: '/all_relations_3d',
        component: () => import('@/view/all_relations/Three')
      },
      {
        path: '/search',
        component: () => import('@/view/search/Search')
      },
      {
        path: '/question',
        component: () => import('@/view/answer_questions/Question')
      }
    ]
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
